package mybbs;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;

//
public class ParentForumBean {
  public ParentForumBean(){
	  }
  public List getParentforums() throws Exception {
		DBConn conn = new DBConn();
		List list = new ArrayList();	
		String strsql = "SELECT * FROM forums WHERE isparent=1";
		try {
			ResultSet rs=conn.query(strsql);
			while (rs.next()) 
			{  ForumInfo FT =new ForumInfo();
				FT.setForumid(rs.getInt("id"));
				list.add(FT);
			}
			conn.DBclose();
			}
			catch (Exception e) {
				e.printStackTrace();
			}
			return list;
		}
  }


